<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- css -->
    <link th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}"  href="../static/css/font-awesome.min.css" rel="stylesheet">
    <link th:href="@{/css/nprogress.css}"  href="../static/css/nprogress.css" rel="stylesheet">
    <link th:href="@{/css/green.css}" href="../static/css/green.css" rel="stylesheet">
    <link th:href="@{/css/bootstrap-progressbar-3.3.4.min.css}" href="../static/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <link th:href="@{/css/jqvmap.min.css}" href="../static/css/jqvmap.min.css" rel="stylesheet"/>
    <link th:href="@{/css/dropzone.min.css}" href="../static/css/dropzone.min.css" rel="stylesheet">
    <link th:href="@{/css/custom.min.css}" href="../static/css/custom.min.css" rel="stylesheet">
    <!-- Custom Style -->
    <link th:href="@{/localcss/crmlist.css}" href="../../static/localcss/crmlist.css" rel="stylesheet">
</head>

<body class="nav-md footer_fixed">
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col menu_fixed">

                <div class="left_col scroll-view">
                    <div class="navbar nav_title" style="border: 0;">
                        <a href="../main.html" class="site_title">
                            <i class="fa fa-paw"></i>
                            <span>科泰教育CRM</span>
                        </a>
                    </div>

                    <div class="clearfix"></div>

                    <!-- menu profile quick info -->
                    <div class="profile">
                        <div class="profile_pic">
                            <img src="../static/images/img.jpg" alt="..." class="img-circle profile_img">
                        </div>
                        <div class="profile_info">
                            <span>Welcome,</span>
                            <h2>张三</h2>
                        </div>
                    </div>
                    <!-- /menu profile quick info -->

                    <br />

                    <!-- sidebar menu -->
                    <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                        <div class="menu_section">
                            <h3>登录角色</h3>

                            <ul class="nav side-menu" style="">
                                <li>
                                    <a>
                                        <i class="fa fa-home"></i> <span>营销管理</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu">
                                        <li>
                                            <a href="/crm/chance/list">销售机会管理</a>
                                        </li>
                                        <li>
                                            <a href="/crm/plan/list">客户开发计划</a>
                                        </li>
                                    </ul>
                                </li>
                                <li>
                                    <a>
                                        <i class="fa fa-home"></i> <span>客户管理</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu">
                                        <li>
                                            <a href="/crm/customer/list">客户信息管理</a>
                                        </li>
                                        <li>
                                            <a href="/crm/lost/list">客户流失管理</a>
                                        </li>
                                    </ul>
                                </li>
                                <li>
                                    <a>
                                        <i class="fa fa-home"></i> <span>服务管理</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu">
                                        <li>
                                            <a href="/crm/service/add">服务创建</a>
                                        </li>
                                        <li>
                                            <a href="/crm/service/dispatch">服务分配</a>
                                        </li>
                                        <li>
                                            <a href="/crm/service/deal">服务处理</a>
                                        </li>
                                        <li>
                                            <a href="/crm/service/feedback">服务反馈</a>
                                        </li>
                                        <li>
                                            <a href="/crm/service/arch">服务归档</a>
                                        </li>
                                    </ul>
                                </li>
                                <li>
                                    <a>
                                        <i class="fa fa-home"></i> <span>统计报表</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu">
                                        <li>
                                            <a href="/crm/contrRpt/list">客户贡献分析</a>
                                        </li>
                                        <li>
                                            <a href="/crm/consRpt/list">客户构成分析</a>
                                        </li>
                                        <li>
                                            <a href="/crm/svrRpt/list">客户服务分析</a>
                                        </li>
                                        <li>
                                            <a href="/crm/lostRpt/list">客户流失分析</a>
                                        </li>
                                    </ul>
                                </li>
                                <li>
                                    <a>
                                        <i class="fa fa-home"></i> <span>基础数据</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu">
                                        <li>
                                            <a href="/crm/dict/list">客户等级管理</a>
                                        </li>
                                        <li>
                                            <a href="/crm/product/list">查询产品信息</a>
                                        </li>
                                        <li>
                                            <a href="/crm/storage/list">查询库存</a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="active">
                                    <a>
                                        <i class="fa fa-home"></i> <span>权限管理</span>
                                        <span class="fa fa-chevron-down"></span>
                                    </a>
                                    <ul class="nav child_menu" style="display: block;">
                                        <li class="current-page">
                                            <a href="/crm/user/list">用户管理</a>
                                        </li>
                                        <li>
                                            <a href="/crm/role/list">角色管理</a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <!-- /sidebar menu -->

                    <!-- /menu footer buttons -->
                    <div class="sidebar-footer hidden-small">
                        <a data-toggle="tooltip" data-placement="top" title="设置">
                            <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="全屏">
                            <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="锁定">
                            <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="退出" href="/logout">
                            <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
                        </a>
                    </div>
                    <!-- /menu footer buttons -->
                </div>
            </div>
            <div class="top_nav">
                <!-- top navigation -->
                <div class="nav_menu">
                    <nav>
                        <div class="nav toggle">
                            <a id="menu_toggle">
                                <i class="fa fa-bars"></i>
                            </a>
                        </div>

                        <ul class="nav navbar-nav navbar-right">
                            <li class=""><a href="javascript:;" class="user-profile dropdown-toggle"
                                    data-toggle="dropdown" aria-expanded="false"> <img src="../static/images/img.jpg"
                                        alt=""> <span class=" fa fa-angle-down">用户名</span> </a>
                                <ul class="dropdown-menu dropdown-usermenu pull-right">
                                    <li><a href="/logout"><i class="fa fa-sign-out pull-right"></i>退出</a>
                                    </li>
                                </ul>
                            </li>

                            <li role="presentation" class="dropdown">

                                <ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu">
                                    <li><a> <span class="image"><img src="../static/images/img.jpg"
                                                    alt="Profile Image" />
                                            </span> <span> <span>John Smith</span> <span class="time">3
                                                    mins ago</span> </span> <span class="message"> Film festivals used
                                                to be do-or-die moments for movie makers. They were where...
                                            </span> </a></li>
                                    <li><a> <span class="image"><img src="../static/images/img.jpg"
                                                    alt="Profile Image" />
                                            </span> <span> <span>John Smith</span> <span class="time">3
                                                    mins ago</span> </span> <span class="message"> Film festivals used
                                                to be do-or-die moments for movie makers. They were where...
                                            </span> </a></li>
                                    <li><a> <span class="image"><img src="../static/images/img.jpg"
                                                    alt="Profile Image" />
                                            </span> <span> <span>John Smith</span> <span class="time">3
                                                    mins ago</span> </span> <span class="message"> Film festivals used
                                                to be do-or-die moments for movie makers. They were where...
                                            </span> </a></li>
                                    <li><a> <span class="image"><img src="../static/images/img.jpg"
                                                    alt="Profile Image" />
                                            </span> <span> <span>John Smith</span> <span class="time">3
                                                    mins ago</span> </span> <span class="message"> Film festivals used
                                                to be do-or-die moments for movie makers. They were where...
                                            </span> </a></li>
                                    <li>
                                        <div class="text-center">
                                            <a> <strong>See All Alerts</strong> <i class="fa fa-angle-right"></i> </a>
                                        </div>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </nav>
                </div>
                <!-- /top navigation -->
            </div>
            <div class="right_col" role="main">
                <div class="">
                    <div class="clearfix"></div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2>
                                        用户管理 <i class="fa fa-user"></i>
                                        <small>
                                            - 您可以通过搜索或者其他的筛选项对用户的信息进行编辑、删除等管理操作。^_^
                                        </small>
                                    </h2>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="x_content">
                                    <form method="post" action="/user/list">
                                        <input type="hidden" name="pageIndex" value="1" />
                                        <ul>
                                            <li>
                                                <div class="form-group">
                                                    <label
                                                        class="control-label col-md-3 col-sm-3 col-xs-12">用户名称</label>
                                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                                        <input name="usrName" type="text"
                                                            class="form-control col-md-6 col-xs-12" value="">
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="form-group">
                                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">角色</label>
                                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                                        <select name="roleId" id="roleId" class="form-control">
                                                            <option value="0">--请选择--</option>
                                                            <option value="">
                                                                角色1
                                                            </option>
                                                        </select>
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                                <button type="submit" class="btn btn-primary">
                                                    查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询
                                                </button>
                                            </li>
                                        </ul>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_content">
                                    <p class="text-muted font-13 m-b-30"></p>
                                    <div id="datatable-responsive_wrapper"
                                        class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <a href="add.html" class="btn btn-success btn-sm">新增用户信息</a>
                                                <table id="datatable-responsive"
                                                    class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                                                    cellspacing="0" width="100%" role="grid"
                                                    aria-describedby="datatable-responsive_info" style="width: 100%;">
                                                    <thead>
                                                        <tr role="row">
                                                            <th class="sorting_asc" tabindex="0"
                                                                aria-controls="datatable-responsive" rowspan="1"
                                                                colspan="1"
                                                                aria-label="First name: activate to sort column descending"
                                                                aria-sort="ascending">编号
                                                            </th>
                                                            <th class="sorting" tabindex="0"
                                                                aria-controls="datatable-responsive" rowspan="1"
                                                                colspan="1"
                                                                aria-label="Last name: activate to sort column ascending">
                                                                用户名
                                                            </th>
                                                            <th class="sorting" tabindex="0"
                                                                aria-controls="datatable-responsive" rowspan="1"
                                                                colspan="1"
                                                                aria-label="Last name: activate to sort column ascending">
                                                                角色
                                                            </th>
                                                            <th class="sorting" tabindex="0"
                                                                aria-controls="datatable-responsive" rowspan="1"
                                                                colspan="1"
                                                                aria-label="Last name: activate to sort column ascending">
                                                                操作
                                                            </th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr role="row" class="odd" th:each="tempUser:${userList}">
                                                            <td tabindex="0" class="sorting_1" th:text="${tempUser.usrId}"> usrId</td>
                                                            <td th:text="${tempUser.usrName}">usrName</td>
                                                            <td th:text="${tempUser.role.roleName}">roleName</td>
                                                            <td>
                                                                <div class="btn-group">
                                                                    <button type="button"
                                                                        class="btn btn-danger">点击操作</button>
                                                                    <button type="button"
                                                                        class="btn btn-danger dropdown-toggle"
                                                                        data-toggle="dropdown" aria-expanded="false">
                                                                        <span class="caret"></span>
                                                                        <span class="sr-only">Toggle Dropdown</span>
                                                                    </button>
                                                                    <ul class="dropdown-menu" role="menu">
                                                                        <li><a class="editInfo"
                                                                                href="edit.html"
                                                                                data-toggle="tooltip"
                                                                                data-placement="top" title=""
                                                                                data-original-title="编辑">编辑</a>
                                                                        </li>
                                                                        <li><a class="delInfo" id="del" href="#"
                                                                                data-toggle="tooltip"
                                                                                data-placement="top" title=""
                                                                                data-original-title="删除">删除</a></li>
                                                                    </ul>
                                                                </div>
                                                            </td>
                                                        </tr>
<!--                                                        <tr role="row" class="odd">-->
<!--                                                            <td tabindex="0" class="sorting_1">-->
<!--                                                                usrId</td>-->
<!--                                                            <td>usrName</td>-->
<!--                                                            <td>roleName</td>-->
<!--                                                            <td>-->
<!--                                                                <div class="btn-group">-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger">点击操作</button>-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger dropdown-toggle"-->
<!--                                                                        data-toggle="dropdown" aria-expanded="false">-->
<!--                                                                        <span class="caret"></span>-->
<!--                                                                        <span class="sr-only">Toggle Dropdown</span>-->
<!--                                                                    </button>-->
<!--                                                                    <ul class="dropdown-menu" role="menu">-->
<!--                                                                        <li><a class="editInfo"-->
<!--                                                                                href="edit.html"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="编辑">编辑</a>-->
<!--                                                                        </li>-->
<!--                                                                        <li><a class="delInfo" id="del" href="#"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="删除">删除</a></li>-->
<!--                                                                    </ul>-->
<!--                                                                </div>-->
<!--                                                            </td>-->
<!--                                                        </tr>-->
<!--                                                        <tr role="row" class="odd">-->
<!--                                                            <td tabindex="0" class="sorting_1">-->
<!--                                                                usrId</td>-->
<!--                                                            <td>usrName</td>-->
<!--                                                            <td>roleName</td>-->
<!--                                                            <td>-->
<!--                                                                <div class="btn-group">-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger">点击操作</button>-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger dropdown-toggle"-->
<!--                                                                        data-toggle="dropdown" aria-expanded="false">-->
<!--                                                                        <span class="caret"></span>-->
<!--                                                                        <span class="sr-only">Toggle Dropdown</span>-->
<!--                                                                    </button>-->
<!--                                                                    <ul class="dropdown-menu" role="menu">-->
<!--                                                                        <li><a class="editInfo" href="edit.html"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="编辑">编辑</a>-->
<!--                                                                        </li>-->
<!--                                                                        <li><a class="delInfo" id="del" href="#"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="删除">删除</a></li>-->
<!--                                                                    </ul>-->
<!--                                                                </div>-->
<!--                                                            </td>-->
<!--                                                        </tr>-->
<!--                                                        <tr role="row" class="odd">-->
<!--                                                            <td tabindex="0" class="sorting_1">-->
<!--                                                                usrId</td>-->
<!--                                                            <td>usrName</td>-->
<!--                                                            <td>roleName</td>-->
<!--                                                            <td>-->
<!--                                                                <div class="btn-group">-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger">点击操作</button>-->
<!--                                                                    <button type="button"-->
<!--                                                                        class="btn btn-danger dropdown-toggle"-->
<!--                                                                        data-toggle="dropdown" aria-expanded="false">-->
<!--                                                                        <span class="caret"></span>-->
<!--                                                                        <span class="sr-only">Toggle Dropdown</span>-->
<!--                                                                    </button>-->
<!--                                                                    <ul class="dropdown-menu" role="menu">-->
<!--                                                                        <li><a class="editInfo"-->
<!--                                                                                href="edit.html"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="编辑">编辑</a>-->
<!--                                                                        </li>-->
<!--                                                                        <li><a class="delInfo" id="del" href="#"-->
<!--                                                                                data-toggle="tooltip"-->
<!--                                                                                data-placement="top" title=""-->
<!--                                                                                data-original-title="删除">删除</a></li>-->
<!--                                                                    </ul>-->
<!--                                                                </div>-->
<!--                                                            </td>-->
<!--                                                        </tr>-->
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-5">
                                                <div class="dataTables_info" id="datatable-responsive_info"
                                                    role="status" aria-live="polite">共<span>1</span>条记录
                                                    <span>1</span>/<span>1</span>页
                                                </div>
                                            </div>
                                            <div class="col-sm-7">
                                                <div class="dataTables_paginate paging_simple_numbers"
                                                    id="datatable-responsive_paginate">
                                                    <ul class="pagination">
                                                        <li class="paginate_button previous"><a
                                                                href="javascript:page_nav(document.forms[0],1);"
                                                                aria-controls="datatable-responsive" data-dt-idx="0"
                                                                tabindex="0">首页</a>
                                                        </li>
                                                        <li class="paginate_button"><a href="#"
                                                                aria-controls="datatable-responsive" data-dt-idx="1"
                                                                tabindex="0">上一页</a>
                                                        </li>
                                                        <li class="paginate_button "><a href="#"
                                                                aria-controls="datatable-responsive" data-dt-idx="1"
                                                                tabindex="0">下一页</a>
                                                        </li>
                                                        <li class="paginate_button next"><a href="#"
                                                                aria-controls="datatable-responsive" data-dt-idx="7"
                                                                tabindex="0">最后一页</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <footer th:include="~{user/footer::footer(科泰教育)}">

                    <!-- footer content -->
                    <div class="pull-right">©2021 All Rights Reserved 科泰教育</div>
                    <div class="clearfix"></div>
                    <!-- /footer content -->

<!--                    <div th:include="~{footer::footer2}"></div>-->
                </footer>
            </div>
        </div>
</body>
<!--js -->
<script src="../../static/js/jquery.min.js"></script>
<script src="../../static/js/bootstrap.min.js"></script>
<script src="../../static/js/fastclick.js"></script>
<script src="../../static/js/nprogress.js"></script>
<script src="../../static/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="../../static/js/dropzone.js"></script>
<script src="../../static/js/custom.min.js"></script>
<script src="../../static/localjs/rollpage.js"></script>
<script>
    function doDel(obj, usrId) {
        if (confirm("你确定需要删除该用户信息吗？")) {
            $.ajax({
                type: "GET",
                url: "/crm/user/del/" + usrId,
                /*data: {
                    "usrId": usrId
                },*/
                dataType: "json",
                success: function (data) {
                    if (data.delResult == "true") { // 删除成功：移除删除行
                        alert("删除成功！");
                        $(obj).parents("tr").remove();
                    }
                },
                error: function (data) {
                    alert("对不起，删除失败！");
                }
            });
        }
    }

    /*$(document).ready(function(){
        $.ajax({
            type:"GET",
            url:"${pageContext.request.contextPath}/role/json",
            dataType:"json",
            success:function(data){
                $.each(data, function(i, tmp) {
                    $("#roleId").append(
                        "<option value='"+tmp.roleId+"'>" + tmp.roleName + "</option>");
                });
            },
            error:function(data){
                alert("对不起，获取数据失败！");
            }
        });
    });*/
</script>

</html>